package com.atguigu.srb.sms.controller;

import com.atguigu.srb.result.ResponseVo;
import com.atguigu.srb.sms.service.SMSService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * ClassName: SMSController
 * Package: com.atguigu.srb.sms.controller
 * Description:
 *
 * @Author 刘强
 * @Create 2024/4/18 21:17
 * @Version 1.0
 */
@RestController
@RequestMapping("/api/sms")
public class SMSController {
    @Autowired
    private SMSService smsService;
    @ApiOperation("发送短信")
    @GetMapping("{mobile}/{type}")
    public ResponseVo sendSMS(@PathVariable String mobile,@PathVariable Integer type){
        smsService.sendSMS(mobile,type);
        return ResponseVo.ok().message("短信发送成功");
    }
}
